import java.io.File;


public class Main {
	public final String DIR_PATH = "D:\\Users\\CGCAD-wX\\Pictures\\Previous\\迅雷方舟\\高校校花";

	public StringBuilder JsonStr = new StringBuilder()

	public static void copyFolder(String oldPath, String newPath){
		try{
			(new File(newPath)).mkdir();
			File oldFile = new File(oldPath);
			String[] oldFiles = oldFile.list();
			File temp = null;
			for (int i = 0; i < oldFiles.length; i++){
				if (oldPath.endsWith(File.separator))
					temp = new File(oldPath + oldFiles[i]);
				else
					temp = new File(oldPath + File.separator + oldFiles[i])；

				if (temp.isFile()) {
					FileInputStream input = new FileInputStream(temp);
					FileOutputStream output = new FileOutputStream(newPath + "/" + (temp.getName()).toString());
					byte[] b = new byte[1024 * 5];
					int len;
					while ((len = input.read(b)) != -1) {
						output.write(b, 0, len);
					}
					output.flush();
					output.close();
					input.close();
				}

				if (temp.isDirectory()){
					copyFolder(oldPath + "/" + oldFiles[i], newPath + "/" + oldFiles[i]);
				}
			}
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
	}

	public string outputJson(String newDirPath)
	{
		File file = new File(newDirPath);

		JsonStr.append("[");


		if (file.isDirectory())
		{
			String[] filelist = file.list();

			for (int i = 0; i < filelist.length; i++) {
				
			}
		}

	}
}
